<template>
  <div>
    <form @submit.prevent="mm">
        <input type="text" name="username" v-model.trim.lazy="form.username">

        <input type="text" name="password" v-model.number.trim="form.password" value="123">

        <button>提交</button>
    </form>
  </div>
</template>

<script>
export default {
  data(){
    return {
      msg:'杭州的第一场雪',

        form:{
            username:'',
            password:''
        }
    }
  },
  methods:{
    mm(e){
      e.preventDefault()
      console.log(this.form.username);
      console.log(this.form.password);
    }
  }
}
</script>

<style>

</style>